package com.gmp.thewizard;

import android.content.Context;
import android.graphics.Canvas;
import android.util.Log;

public class DrawEngine {
	
	private static final String TAG = "DrawEngine";
	
	public DrawEngine(){}
	
	protected void draw(Context context, Canvas canvas, Obstacle[] tree){
		drawObstacles(context, canvas, tree);
	}
	
	protected void drawObstacles(Context context, Canvas canvas, Obstacle[] coords){
		try {
			for(Obstacle single : coords){
				canvas.drawCircle(single.x, single.y, single.radius, single.color);
			}
		} catch(Exception e){
			Log.e(TAG,"I was not able to draw any obsticles: " + e);
		}
	}
	
	/* Draw tree using bitmap
	protected void drawTrees(Context context, Canvas canvas, float[][] coords){
		for(float[] single : coords){
			Bitmap tree = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(context.getResources(), R.drawable.tree), 50, 50, false);
			canvas.drawBitmap(tree, single[0], single[1], null);
		}
	}*/
}